home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 9 / 009.d81 / alarm clock (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  210 lines

  1. 0 poke53281,1:poke53280,1:print"[147][157]";
  2. 5 aa$=" ":printchr$(8)
  3. 10 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
  4. 20 fora=1to15:print"[194] [194] [194] [194] [194]         [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
  5. 30 fora=1to15:print"[194] [194] [194] [194] [194]                     [194] [194] [194] [194] [199]":next
  6. 40 fora=1to15:print"[194] [194] [194] [194] [194]         [194] [194]   [194] [194]   [194] [194] [194] [194] [199]":next
  7. 50 fora=1to15:print"[194] [194] [194] [194] [194]                     [194] [194] [194] [194] [199]":next
  8. 60 fora=1to15:print"[194] [194] [194] [194] [194] [199] [199]   [199] [194]     [194] [194]     [194] [194] [194] [199]":next
  9. 63 fora=1to15:print"[194] [194] [194] [194] [194]                     [194] [194] [194] [194] [199]":next
  10. 65 fora=1to15:print"  press any key to begin the program  ":next
  11. 67 fora=1to15:print"  [194] [194] [194] [194] [194]                 [194] [194] [194] [194] [194]  ":next
  12. 70 fora=1to15:print"[199] [199] [199] [194] [194]                     [199] [199] [199] [199] [199]":next
  13. 75 fora=1to15:print"[199]   [199]   [194]                     [199]   [199]   [199]":next
  14. 77 fora=1to15:print"[194] [194] [194] [194] [194] [199] [199] [199] [199] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
  15. 80 getx$:ifx$=""then60
  16. 85 fora=1to15:print"[194] [194] [194] [194] [194]one moment please[194] [194] [194] [194] [194] [194] [199]":next
  17. 90 fora=1to15:print"[199] [199] [199] [194] [194]                     [199] [199] [199] [199] [199]":next
  18. 91 pm$="[209][209][209][209] [209]       [209]"
  19. 92 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]  [209] [209][209]     [209][209]"
  20. 93 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209][209][209][209] [209] [209]   [209] [209]"
  21. 94 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]    [209]  [209] [209]  [209]"
  22. 95 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]    [209]   [209]   [209]"
  23. 96 am$="[209][209][209][209] [209]      [160][209]"
  24. 97 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]  [209] [209][209]     [209][209]"
  25. 98 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209][209][209][209] [209] [209]   [209] [209]"
  26. 99 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]  [209] [209]  [209] [209]  [209]"
  27. 100 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209]  [209] [209]   [209]   [209]"
  28. 125 fora=1to25:print"[199] [199] [199] [194] [194] one moment  please  [199] [199] [199] [199] [199]":next
  29. 126 fora=1to25:print"[194] [194] [194] [194] [194] [199] [199] [199] [199] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
  30. 127 ifval(ti$)<010000then160
  31. 128 ifval(ti$)=>130000then160
  32. 129 print"register reads- ";ti$
  33. 130 print"is this correct, user?"
  34. 140 getx$:ifx$=""then129
  35. 150 ifx$<>"n"then500
  36. 160 print"[147]type correct value (12-hour format)"
  37. 165 print" 010000-125959 (hhmmss 6 digits)":input a1$:goto172
  38. 170 goto165
  39. 172 a1$=left$(a1$,6)
  40. 173 ifval(a1$)<010000then170
  41. 195 ifval(a1$)>125959then170
  42. 210 ti$=a1$
  43. 300 print"";ti$
  44. 305 gosub 30000
  45. 310 a3=a3+1:ifa3>200then85
  46. 320 goto300
  47. 500 gosub507
  48. 505 goto2015
  49. 507 xc$="[157][157][157][157][157][157][157][157]"
  50. 510 k$(0)=xc$:for ii=1to8:k$(0)=k$(0)+aa$:next:aa$=aa$+"[146]"
  51. 520 k$(1)=xc$+aa$+"[146]      "+aa$+"[146]"
  52. 530 k$(2)=xc$+"[146]       "+aa$+"[146]"
  53. 540 k$(3)=xc$+"[146]"+aa$+"       "
  54. 550 k$(4)=xc$+"[146]        "
  55. 610 k$(5)=right$(k$(0),16)
  56. 620 k$(6)=right$(k$(1),14)
  57. 630 k$(7)=right$(k$(2),12)
  58. 640 k$(8)=right$(k$(3),11)
  59. 650 k$(9)=right$(k$(4),9)
  60. 1000 a$(0)=k$(5)+k$(1)+k$(1)+k$(1)+k$(1)+k$(1)+k$(1)
  61. 1010 a$(0)=a$(0)+k$(1)+k$(1)+k$(0)
  62. 1020 a$(1)=k$(7)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)
  63. 1030 a$(1)=a$(1)+k$(2)+k$(2)+k$(2)
  64. 1040 a$(2)=k$(5)+k$(2)+k$(2)+k$(2)+k$(0)+k$(3)+k$(3)
  65. 1050 a$(2)=a$(2)+k$(3)+k$(3)+k$(0)
  66. 1060 a$(3)=k$(5)+k$(2)+k$(2)+k$(2)+k$(0)+k$(2)+k$(2)
  67. 1070 a$(3)=a$(3)+k$(2)+k$(2)+k$(0)
  68. 1080 a$(4)=k$(6)+k$(1)+k$(1)+k$(1)+k$(0)+k$(2)+k$(2)
  69. 1090 a$(4)=a$(4)+k$(2)+k$(2)+k$(2)
  70. 1100 a$(5)=k$(5)+k$(3)+k$(3)+k$(3)+k$(0)+k$(2)+k$(2)
  71. 1110 a$(5)=a$(5)+k$(2)+k$(2)+k$(0)
  72. 1120 a$(6)=k$(5)+k$(3)+k$(3)+k$(3)+k$(0)+k$(1)+k$(1)
  73. 1130 a$(6)=a$(6)+k$(1)+k$(1)+k$(0)
  74. 1140 a$(7)=k$(5)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)
  75. 1150 a$(7)=a$(7)+k$(2)+k$(2)+k$(2)
  76. 1160 a$(8)=k$(5)+k$(1)+k$(1)+k$(1)+k$(0)+k$(1)+k$(1)
  77. 1170 a$(8)=a$(8)+k$(1)+k$(1)+k$(0)
  78. 1180 a$(9)=k$(5)+k$(1)+k$(1)+k$(1)+k$(0)+k$(2)+k$(2)
  79. 1190 a$(9)=a$(9)+k$(2)+k$(2)+k$(2)
  80. 1200 a$(10)=k$(9)+k$(4)+k$(4)+k$(4)+k$(4)+k$(4)+k$(4)
  81. 1210 a$(10)=a$(10)+k$(4)+k$(4)+k$(4)
  82. 1230 return
  83. 2015 print"[147]";a$(1):print"";a$(0)
  84. 2017 forx=1to1000:next
  85. 2020 print"[147]";:fora=9to0step-1:print"";:printa$(a);
  86. 2030 next
  87. 2040 print"[147]"
  88. 2100 print"            press q to quit."
  89. 2102 getr$:r=val(r$):ifr$="q"then63000
  90. 2107 x1$=left$(ti$,1):x2$=mid$(ti$,2,1):x3$=mid$(ti$,3,1)
  91. 2110 x4$=mid$(ti$,4,1):x5$=mid$(ti$,5,1):x6$=right$(ti$,1)
  92. 2120 x7$=x1$+x2$+x3$+x4$+x5$+x6$
  93. 2130 ifx7$=al$+"01"thengosub20000
  94. 2140 ifx1$="0"then2155
  95. 2150 print"";a$(val(x1$)):goto2160
  96. 2155 print"";a$(10)
  97. 2160 print"";a$(val(x2$))
  98. 2170 print"";x5$
  99. 2180 print"";x6$
  100. 2190 print"";a$(val(x3$))
  101. 2200 print"";a$(val(x4$))
  102. 2310 gosub30000
  103. 3285 ifr=0then2100
  104. 3290 onrgosub4000,5000,6000,7000,8000,9000,9500,9600,40000
  105. 3300 goto2100
  106. 4000 print"[147]":fors=1to10
  107. 4002 x5$=mid$(ti$,5,1):x6$=right$(ti$,1)
  108. 4003 gosub30000
  109. 4010 print"";a$(val(x5$))
  110. 4015 print"";a$(val(x6$))
  111. 4020 getx1$:ifx1$=" "then4002
  112. 4030 next:print"[147]":return
  113. 5000 print"[147]":g1$=g3$
  114. 5001 print"":g1$=g3$
  115. 5170 print"";g3$
  116. 5180 print" (p)m or (a)m ?";
  117. 5220 getg1$:ifg1$=""thengosub30000
  118. 5222 printg1$
  119. 5223 ifg1$="a"theng1$=am$:goto5230
  120. 5224 ifg1$="p"theng1$=pm$:goto5230
  121. 5225 g3$=g1$:goto5001
  122. 5230 print"[147]":return
  123. 6000 print"[147]";g1$
  124. 6010 fora=1to1000:next
  125. 6020 print"[147]":return
  126. 7000 s=54272
  127. 7010 forl=0to24:pokes+l,0:next
  128. 7030 pokes+14,5
  129. 7040 rempokes+18,16
  130. 7050 pokes+3,1
  131. 7060 pokes+24,143
  132. 7070 pokes+6,240
  133. 7080 pokes+4,65
  134. 7090 fr=5389
  135. 7100 getd$
  136. 7110 fq=fr+peek(s+27)*3.5
  137. 7120 hf=int(fq/256):lf=fq-hf*256
  138. 7130 pokes+0,lf:pokes+1,hf
  139. 7135 gosub30000
  140. 7140 ifd$=""then7100
  141. 7150 pokes+24,0:r=0:return
  142. 8000 print"[147]"
  143. 8010 input"alarm setting 0100-1259";al$
  144. 8015 ifval(al$)>1259orval(al$)<0100thenprint"[145][145]":goto8010
  145. 8017 iflen(al$)>4thenprint"[145][145]":goto8010
  146. 8020 input"pm or am";g2$
  147. 8022 ifg2$=pm$then8030
  148. 8024 ifg2$=am$then8030
  149. 8025 ifg2$="pm"theng2$=pm$:goto8030
  150. 8026 ifg2$="am"theng2$=am$:goto8030
  151. 8028 print"[145][145]":goto8020
  152. 8030 print"[147]";:return
  153. 9000 print"[147]"
  154. 9010 print"";a$(val(left$(al$,1)))
  155. 9020 print"";a$(val(mid$(al$,2,1)))
  156. 9030 print"";a$(val(mid$(al$,3,1)))
  157. 9040 print"";a$(val(right$(al$,1)))
  158. 9050 print"";g2$
  159. 9460 fora=1to200
  160. 9470 gosub30000
  161. 9480 next
  162. 9490 print"[147]":return
  163. 9500 print"hit 1-8 to change colors. (blk-yel)"
  164. 9505 gosub30000
  165. 9510 getrr$:ifval(rr$)<1orval(rr$)>8then9505
  166. 9515 print"[147]                                   "
  167. 9520 poke53281,val(rr$)-1
  168. 9530 poke53280,val(rr$)-1:return
  169. 9600 print"hit 1-8 to change colors. (ora-grey3)"
  170. 9605 gosub30000
  171. 9610 getrr$:ifval(rr$)<1orval(rr$)>8then9605
  172. 9615 print"[147]                                     "
  173. 9620 poke53281,val(rr$)+7
  174. 9630 poke53280,val(rr$)+7:return
  175. 20000 ifg1$><g2$thenreturn
  176. 20010 gosub7000
  177. 20100 return
  178. 30000 ifti$="120000"then30030
  179. 30001 ifti$=al$+"01"then20000
  180. 30003 ifval(left$(ti$,2))<13then30020
  181. 30005 zz=val(left$(ti$,2)):ifzz>12thenxx$=str$(zz-12)+right$(ti$,4)
  182. 30006 ifasc